import 'package:flutter_demo/app/app.dart';
import 'package:flutter/material.dart';
import 'package:flutter_demo/pages/auth/login.page.dart';

class AppWidget extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {

    return new _AppWidgetState();
  }
}

class _AppWidgetState extends State<AppWidget> {
  static const MaterialColor themeColor = MaterialColor(
    _amberPrimaryValue,
    <int, Color>{
      50: Color(_amberPrimaryValue),
      100: Color(_amberPrimaryValue),
      200: Color(_amberPrimaryValue),
      300: Color(_amberPrimaryValue),
      400: Color(_amberPrimaryValue),
      500: Color(_amberPrimaryValue),
      600: Color(_amberPrimaryValue),
      700: Color(_amberPrimaryValue),
      800: Color(_amberPrimaryValue),
      900: Color(_amberPrimaryValue),
    },
  );

  static const int _amberPrimaryValue = 0xFFCD162C;

  @override
  Widget build(BuildContext context) {

    return new MaterialApp(
      title: '团子',
      theme: new ThemeData(
        primarySwatch: themeColor,
        accentColor: Colors.amber,
      ),
      home: new LoginPage(),
      onGenerateRoute: App.router.generator,
    );
  }
}
